<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改终端购买人变更记录')" />
    <th:block th:include="include :: datetimepicker-css" />
    </head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-purchaserRecord-edit" th:object="${purchaserUpdateRecord}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">
                <label class="col-sm-3 control-label">批次号：</label>
                <div class="col-sm-8">
                    <input name="batch" th:field="*{batch}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">终端号：</label>
                <div class="col-sm-8">
                    <input name="sn" th:field="*{sn}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">终端型号：</label>
                <div class="col-sm-8">
                    <input name="model" th:field="*{model}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">原采购人编号：</label>
                <div class="col-sm-8">
                    <input name="beforePurchaser" th:field="*{beforePurchaser}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">变更采购人编号：</label>
                <div class="col-sm-8">
                    <input name="laterPurchaser" th:field="*{laterPurchaser}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">变更状态 0成功、1失败：</label>
                <div class="col-sm-8">
                    <select name="updateType" class="form-control m-b">
                        <option value="">所有</option>
                    </select>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">变更人：</label>
                <div class="col-sm-8">
                    <input name="updateMan" th:field="*{updateMan}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">变更时间：</label>
                <div class="col-sm-8">
                    <input name="updateDate" th:field="*{updateDate}" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "record/purchaserRecord";
        $("#form-purchaserRecord-edit").validate({
            focusCleanup: true
        });

        $("input[name='date']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-purchaserRecord-edit').serialize());
            }
        }
    </script>
</body>
</html>